#include <iostream>
#include <functional>
#include <vector>
#include <unordered_map>
#include <string>
using namespace std;
typedef std::function<void()> func;
std::vector<func> callbacks;
std::unordered_map<int,std::string> desc;
void task1()
{
    std::cout<<"我执行任务1\n"<<std::endl;
}

void task2()
{
    std::cout<<"我执行任务2\n"<<std::endl;
}

void task3()
{
    std::cout<<"我执行任务3\n"<<std::endl;
}

void task4()
{
    std::cout<<"我执行任务4\n"<<std::endl;
}

void load()
{
    desc.insert({callbacks.size(),"task1"});
    callbacks.push_back(task1);
    desc.insert({callbacks.size(),"task2"});
    callbacks.push_back(task2);
    desc.insert({callbacks.size(),"task3"});
    callbacks.push_back(task3);
    desc.insert({callbacks.size(),"task4"});
    callbacks.push_back(task4);
}

void show()
{
    for(auto iter:desc)
    {
        cout<<iter.first<<"\t"<<iter.second<<endl;
    }
}
